<div xmlns="http://www.w3.org/1999/xhtml"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     class="autorize">

    <ui:include src="/resources/includes/locale.xhtml"/>
    <h:outputText value="#{msgs['version']}: #{applicationScope['MODULE_VERSION']}"
                  styleClass="left bgimg"/>
    <h:panelGroup rendered="#{request.userPrincipal == null}">
        <h:link outcome="/login" styleClass="bgimg" value="#{msgs['enter']}"/>
    </h:panelGroup>
    <h:panelGroup rendered="#{request.userPrincipal != null}">
        <h:outputText value="#{msgs['user']}: [#{request.userPrincipal.name}]" styleClass="bgimg"/>
        <h:outputText value="#{msgs['authorities']}: #{request.userPrincipal.authorities}" styleClass="bgimg"/>
        <a href="${request.contextPath}/j_spring_security_logout" class="bgimg">
            <h:outputText value="#{msgs['exit']}"/>
        </a>
    </h:panelGroup>
</div>